/**
 * @file    WebDocHostUIHandler.h
 * @brief   
 * @date    2005-03-15 15:55:23
 * @author  GengYong (gengyong@gmail.com)
 *
 */

#ifndef WEBWINDOW_HEADER_WEBDOCHOSTUIHANDLER_H
#define WEBWINDOW_HEADER_WEBDOCHOSTUIHANDLER_H
//----------------------------------------------------------

#include "WebWindowImpl.h"
#include "WebExternalDispatcher.h"

namespace xessage_private {
	class WebDocHostUIHandler:public IDocHostUIHandler
	{
	public:
		WebDocHostUIHandler(WebWindowImpl * app);
		virtual ~WebDocHostUIHandler();
	public:
		virtual	HRESULT	STDMETHODCALLTYPE QueryInterface(REFIID riid, void ** ppvObject);
		virtual ULONG	STDMETHODCALLTYPE AddRef();
		virtual ULONG	STDMETHODCALLTYPE Release();
		virtual HRESULT STDMETHODCALLTYPE ShowContextMenu(DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved);
		virtual HRESULT STDMETHODCALLTYPE GetHostInfo(DOCHOSTUIINFO *pInfo);
		virtual HRESULT STDMETHODCALLTYPE ShowUI(DWORD dwID, IOleInPlaceActiveObject *pActiveObject, IOleCommandTarget *pCommandTarget, IOleInPlaceFrame *pFrame, IOleInPlaceUIWindow *pDoc);
		virtual HRESULT STDMETHODCALLTYPE HideUI( void);
		virtual HRESULT STDMETHODCALLTYPE UpdateUI( void);
		virtual HRESULT STDMETHODCALLTYPE EnableModeless(BOOL fEnable);
		virtual HRESULT STDMETHODCALLTYPE OnDocWindowActivate(BOOL fActivate);
		virtual HRESULT STDMETHODCALLTYPE OnFrameWindowActivate(BOOL fActivate) ;
		virtual HRESULT STDMETHODCALLTYPE ResizeBorder(LPCRECT prcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fRameWindow);
		virtual HRESULT STDMETHODCALLTYPE TranslateAccelerator(LPMSG lpMsg, const GUID *pguidCmdGroup, DWORD nCmdID);
		virtual HRESULT STDMETHODCALLTYPE GetOptionKeyPath(LPOLESTR *pchKey, DWORD dw);
		virtual HRESULT STDMETHODCALLTYPE GetDropTarget(IDropTarget *pDropTarget, IDropTarget **ppDropTarget);
		virtual HRESULT STDMETHODCALLTYPE GetExternal(IDispatch **ppDispatch);
		virtual HRESULT STDMETHODCALLTYPE TranslateUrl(DWORD dwTranslate, OLECHAR *pchURLIn, OLECHAR **ppchURLOut);
		virtual HRESULT STDMETHODCALLTYPE FilterDataObject(IDataObject *pDO, IDataObject **ppDORet);
	private:
		WebWindowImpl *			m_appImpl;
		WebExternalDispatcher *	m_iDispatcher;
		LONG					m_refCount;
	};
}

//----------------------------------------------------------
#endif	//ifndef WEBWINDOW_HEADER_WEBDOCHOSTUIHANDLER_H
